import java.util.*;

public class Main4 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n,p,q,r;
        n = in.nextInt();
        p = in.nextInt();
        q = in.nextInt();
        r = in.nextInt();
        in.nextLine();
        String str = in.nextLine();
        String[] sArr = str.split(" ");
        List<Integer> list = new ArrayList<>();
        Set<Num> set = new TreeSet<>(new Comparator<Num>() {
            @Override
            public int compare(Num o1, Num o2) {
                return o2.val - o1.val;
            }
        });
        int sum = 0;
        for (int i = 0; i < n; i++) {
            list.add(Integer.parseInt(sArr[i]));
            set.add(new Num(i, list.get(i)));
            sum += list.get(i);
        }
        int ret = 0;
        Iterator<Num> it = set.iterator();
            if(sum > 0) {//这时候应该考虑交换
                System.out.println(0);
                return;
            } else {
                int min = it.next().val;
                if(-min > q) {
                    sum += (-min);
                    ret += q;
                } else {
                    sum += p;
                    ret += p;
                }
            }
        System.out.println(ret);
    }
}

class Num {
    public Num(int index, int val) {
        this.index = index;
        this.val = val;
    }

    public int index;
    public int val;
}
